import http from "@/utils/http";
//获取表格数据列表
export const getList = (params) => {
  return http.post("/project/apply/list", params);
};
//获取数据统计
export const getCount = (params) => {
  return http.post("/project/apply/list-statistics", params);
};
//新增
export const addRecords = (params) => {
  return http.post(`/project/apply/add`, params);
};
//编辑
export const editRecords = (params) => {
  return http.post(`/project/apply/edit`, params);
};
//删除
export const delRecords = (id) => {
  return http.post(`/project/apply/delete`, { ids: id });
};
//记录详情
export const recordsDetail = (params) => {
  return http.get(`/project/apply/view`, params);
};
//启动或结束申报
export const changeState = (params) => {
  return http.post(`/project/apply/changeState`, params);
};

//科研人员申报项目新增基本信息
export const sbProject = (params) => {
  return http.post(`/project/apply/materials/info`, params);
};
//获取申报信息(基本信息)
export const sbBaseDetail = (params) => {
  return http.get(`/project/apply/materials/info`, params);
};
//获取申报信息(成员信息)
export const sbMemberDetail = (params) => {
  return http.get(`/project/apply/materials/member`, params);
};
//科研人员申报项目新增成员信息
export const sbMember = (params) => {
  return http.post(`/project/apply/materials/member`, params);
};
//获取申报信息(成员信息)
export const sbBudgetDetail = (params) => {
  return http.get(`/project/apply/materials/budget-v2`, params);
};
//科研人员申报项目新增成员信息
export const sbBudget = (params) => {
  return http.post(`/project/apply/materials/budget`, params);
};
//申报项目最后一步点击提交按钮
export const submitSb = (params) => {
  return http.post("/project/apply/book/submit", params);
};
//科研人员撤销申报/管理员删除申报
export const delSb = (params) => {
  return http.post(`/project/apply/book/del`, params);
};
//获取历史申请数据
export const getHistoryData = (params) => {
  return http.post(`/project/apply/history`, params);
};
//导出历史申请数据
export const exportHistoryRecords = (params) => {
  return http.post("/project/apply/exportExcel", params, {
    responseType: "blob",
  });
};
//获取负责人历史参与项目
export const historyJoinProject = (params) => {
  return http.get(`/project/apply/i-join`, params);
};
